/**
 * Copyright (Warren)
 * FileName: temp
 * Author:
 * Date:     2019/3/11 11:41
 * Description:
 * History:
 */
package leetcode;

import java.util.*;
import java.lang.String;

public class problem1 {
    public static void main(String[] args){
        HashMap map = new HashMap();
        map.put(null,"a-value");
        map.put("b-key",null);
        System.out.println(map);

        Hashtable table = new Hashtable();
        table.put("a-key","a-value");
        table.put("b-key","b-value");

//        Enumeration em = table.elements();
//        while (em.hasMoreElements()){
//            String obj = (String)em.nextElement();
//            System.out.println(obj);
        Collection coll = map.values();
        Iterator it = coll.iterator();
        while (it.hasNext()){
            String obj = (String) it.next();
            System.out.println(obj);
        }
        String s = "   -123abc ";
        s = s.trim();
        for (int i = 0; i < s.length(); i++) {
            System.out.println(s.charAt(i));
        }
        int i = 2<<3;
//        i--;
        System.out.println((int)Math.pow(2,31)-1);
        System.out.println((int)(Math.pow(2,31)-1));
        System.out.println(Math.pow(2,31)-1);
        System.out.println(Math.pow(2,31));
    }
}
